const tokenKey = 'jyToken'

const get = () => {
  let token = ''
  try {
    token = uni.getStorageSync(tokenKey)
  } catch (e) {}
  return token
}

const save = value => {
  try {
    uni.setStorageSync(tokenKey, value)
    return true
  } catch (e) {
    return false
  }
}

const remove = () => {
  try {
    uni.removeStorageSync(tokenKey)
  } catch (e) {}
}

export default {
  get,
  save,
  remove
}
